﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XsqTech.SmartOA.Dtos.DTO
{
    /// <summary>
    /// 用户DTO
    /// </summary>
    public class AddUserDto
    {
        public Guid Id { get; set; }
        /// <summary>
        /// 用户名称
        /// </summary>
        [StringLength(50)]
        [Required]//特性注解
        public string UserName { get; set; }
        /// <summary>
        /// 用户密码
        /// </summary>
        [StringLength(100)]
        [Required]
        public string UserPassword { get; set; }
        /// <summary>
        /// 用户手机
        /// </summary>
        [Required]
        [StringLength(20)]
        public string UserPhone { get; set; }
        /// <summary>
        /// 头像
        /// </summary>
        public string? HeadPortrait { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        [Required, StringLength(50)]
        public string UserMailbox { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        [Required, StringLength(10)]
        public string UserSex { get; set; }
        /// <summary>
        /// 年龄
        /// </summary>
        public int UserAge { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [Required]
        public int State { get; set; } //1是禁用，0是启用
        public Guid BranchId { get; set; } //一个用户有多个部门，一对多关系
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; } = DateTime.Now;
        /// <summary>
        /// 创建人
        /// </summary>
        public string? CreatePerson { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>
        public string? UpdatePerson { get; set; }
    }
}
